#pragma once
#include <string>
#include <vector>
#include <sstream>
#include "macros.h"

struct packet_data {
	unsigned char* data;
	unsigned int length;
};


class cStream {
protected:
	std::vector<unsigned char> data;

public:
	void writeByte( unsigned char v );
	void writeShort( unsigned short v );
	void writeInt( unsigned int v );
	void writeString( std::string v );

	const packet_data getBuffer();

	unsigned char getFirstByte();

	static int getStringLength( std::string s );
};
